package com.citycloud.ccuap.tc.admin.datagroup;

import com.citycloud.ccuap.commons.sys.entity.SysRole;
import com.citycloud.ccuap.commons.web.session.CurrentUser;
import com.citycloud.ccuap.framework.service.mybatis.IMybatisService;
import com.citycloud.ccuap.tc.admin.entity.SysDatagroup;
import com.citycloud.ccuap.tc.yq.dto.CheckedTreeNodeDTO;
import com.citycloud.ccuap.tc.yq.entity.SysDimensionBustype;

import java.util.List;

/**
 * 数据组业务处理接口
 * @author sufeng
 *
 */
public interface IDatagroupService extends IMybatisService<SysDatagroup, String> {

    /**
     *  获取数据组关联的角色组
     * @param datagroupId
     * @return
     */
    List<SysRole> findSysRoleByDatagroupId(String datagroupId);

    void save(SysDatagroupAllDTO sysDatagroupAllDTO, CurrentUser currentUser);

    List<CheckedTreeNodeDTO> findBusiNextChildNodeTree(List<String> list, Long pid, Integer dataStatus);

    /**
     * @param userId
     * @param projectId
     * @return
     */
    List<SysDatagroup> getAllList(String userId, String projectId);

    List<SysDatagroup> findDataGroupByRoleId(Long roleId, Long projectId);

	void deleteByObjId(String objId);

	void deleteObjIdList(List<String> objIdList);

	void saveCondition(SysDimensionBustype dimensionBuseTypes);

	void addTableConfig(String datagroupId, List<SysDimensionTableConfigDTO> configList);

	void addFieldConfig(String datagroupId, String tableConfigId, String fields);

	void deleteTable(String tableConfigIds);

	void deleteBusType(String objId);


	List<SysDatagroup> getByRoleId(Long roleId);

}